<?php
use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use frontend\widgets\Alert;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use common\WuMing;

/* @var $this \yii\web\View */
/* @var $content string */

AppAsset::register($this);
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
    <meta charset="<?= Yii::$app->charset ?>">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
    <script>
        var collect_url = "<?=Yii::$app->urlManager->createUrl("ajax/collect")?>";
        var report_url = "<?=Yii::$app->urlManager->createUrl("site/report")?>";
        var comment_report_url = "<?=Yii::$app->urlManager->createUrl("comment/report")?>";
        var dingyue_url = "<?=Yii::$app->urlManager->createUrl("ajax/dingyue")?>";
        var zancai_url = "<?=Yii::$app->urlManager->createUrl("ajax/zancai")?>";
        var online_url = "<?=Yii::$app->urlManager->createUrl("ajax/online")?>";
        var signin_url = "<?=Yii::$app->urlManager->createUrl("ajax/signin")?>";
        var comment_url = "<?=Yii::$app->urlManager->createUrl("comment/comment")?>";
        var commentzancai_url = "<?=Yii::$app->urlManager->createUrl("comment/zancai")?>";
        var replay_url = "<?=Yii::$app->urlManager->createUrl("comment/replay")?>";
        var del_comment_url = "<?=Yii::$app->urlManager->createUrl("comment/delete")?>";
        var get_title_url = "<?=Yii::$app->urlManager->createUrl("ajax/get-title")?>";
        var anonymous_url = "<?=Yii::$app->urlManager->createUrl("site/anonymous")?>";
        var read_url = "<?=Yii::$app->urlManager->createUrl("ajax/read")?>";
    </script>

</head>
<body>
<?php $this->beginBody() ?>
<div class="wrap">
    <!--    nav begin-->
    <?php $this->beginContent('@app/views/layouts/nav.php'); ?>
    <?php $this->endContent(); ?>
    <!--    nav end-->

    <div class="container" style="margin-top: 20px;">

        <div class="row">
            <div class="col-xs-9">
                <?= $content ?>
            </div>
            <div class="col-xs-3">
                <!--    sidebar begin-->
<div class="sidebar pd20 mb20 sidepost">
<h4 style="margin-top: 0;">热门帖子</h4>
<ul>
    <?php foreach (\common\Yii01::getHotPost(10) as $v): ?>
     <li>
        <a href=""><?=$v['title']?></a>
        <p><span style="color:#888"><?=$v['view']?>浏览,<?=$v['zan']?>赞</span></p>
     </li>
     <li class="clearfix"></li>   
    <?php endforeach ?>
</ul>
</div>
                <!--    sidebar end-->
            </div>
        </div>

    </div>
</div>
<!--    footer begin-->
<?php $this->beginContent('@app/views/layouts/footer.php'); ?>
<?php $this->endContent(); ?>
<!--    footer end-->


<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
